﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace OracleDAL.Sec
{
    public class LogonStatus
    {
        public Model.Sec.LogonStatus GetModel(int Status)
        {
            Model.Sec.LogonStatus ls = null;
            Model.Sec.Dictionary dic = new OracleDAL.Sec.Dictionary().GetModel(Status.ToString());
            if (dic != null)
            {
                ls = new Model.Sec.LogonStatus();
                ls.Status = Convert.ToInt32(dic.CODEID);
                ls.Message = dic.CODENAME;
            }
            return ls;
        }
        public Model.Sec.LogonStatus GetModel(int Status,Model.Sec.User user)
        {
            Model.Sec.LogonStatus ls = null;
            Model.Sec.Dictionary dic = new OracleDAL.Sec.Dictionary().GetModel(Status.ToString());
            if (dic != null)
            {
                ls = new Model.Sec.LogonStatus();
                ls.Status = Status;
                ls.Message = dic.CODENAME;
                ls.LogonUser = user;
            }
            return ls;
        }
        public bool Update(Model.Sec.LogonStatus logonStatus)
        {
            throw new NotImplementedException();
        }
    }
}
